import requestMock from '@/utils/requestMock'
export interface CartModel{
    code:number,
    data:userCartModel[]
}
export interface userCartModel{
    "id":number,
    "imgUrl":string,
    "Product":string,
    "type":string,
    "price":number,
    "number":number,
    "ischeck":boolean
}

export interface CartModelList{
    data?:any[]
    "cartList":[
        {
            "id":number,
            "imgUrl":string,
            "Product":string,
            "type":string,
            "price":number,
            "number":number,
            "ischeck":boolean
        }
    ],
    "cartList2":[
        {
            "id":number,
            "imgUrl":string,
            "Product":string,
            "type":string,
            "price":number,
            "number":number,
            "ischeck":boolean
        }
    ]

}

export default {
    //获取本地购物车数据1
    reqUserCartList(){
        return requestMock.get<any,CartModel>(`/cartlist1`)
    },
    //获取本地购物车数据2
    reqUserCartList2(){
        return requestMock.get<any,CartModel>(`/cartlist2`)
    },
    //
    getCart(){
        return requestMock.get<any,CartModelList>(`/cartlist`)
    }
}